<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "store".
 *
 * @property integer $id
 * @property string $city
 * @property string $store_code
 * @property string $store_name
 * @property string $store_tel
 * @property string $address
 * @property string $longitude
 * @property string $latitude
 */
class Store extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'store';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['longitude', 'latitude'], 'number'],
            [['city', 'store_code'], 'string', 'max' => 10],
            [['store_name'], 'string', 'max' => 100],
            [['store_tel'], 'string', 'max' => 20],
            [['address'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'city' => '所属城市',
            'store_code' => '门店编码',
            'store_name' => '门店名称',
            'store_tel' => '联系电话',
            'address' => '地址',
            'longitude' => '经度',
            'latitude' => '纬度  ',
        ];
    }
}
